//
//  XS_RechargeItemCell.swift
//  XueDao
//
//  Created by Mac on 2020/12/31.
//

import UIKit
import StoreKit

class XS_RechargeItemCell: UICollectionViewCell {

    @IBOutlet weak var titleLabel: UILabel!
    var _model : SKProduct!
    public var model : SKProduct!{
        set{
            _model = newValue
            //设置数据
            let titleArrStr = NSMutableAttributedString.init(string: newValue.localizedPrice ?? "0")
            titleArrStr.addAttributes([.font : UIFont.systemFont(ofSize: 14, weight: .medium)], range: NSRange.init(location: 0, length: 1))
            titleLabel.attributedText = titleArrStr
        }
        get{
            return _model
        }
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        contentView.layer.cornerRadius = 10
        contentView.clipsToBounds = true
    }

}
